package com.lmt.org.mapper;

import com.lmt.org.domain.Department;
import com.lmt.org.query.DepartmentQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: Amazing
 * @Date: 2022/6/21 13:09
 * @Version: 1.0
 */

@Mapper
public interface DepartmentMapper {
    /**
     * 查询所有
     * @return
     */
    List<Department> loadAll();

    /**
     * 通过id查询
     * @param id
     * @return
     */
    Department loadById(Long id);

    /**
     * 通过id删除
     * @param id
     */
    void remove(Long id);

    /**
     * 添加
     * @param department
     */
    void save(Department department);

    /**
     * 修改
     * @param department
     */
    void update(Department department);

    /**
     * 分页+高级查询
     * @param departmentQuery
     * @return
     */
    List<Department> queryData(DepartmentQuery departmentQuery);

    /**
     * 查询总数
     * @param departmentQuery
     * @return
     */
    Integer queryCount(DepartmentQuery departmentQuery);

    /**
    * @Title: batch
    * @Description: 批量删除
    * @Author: Amazing
    * @Version: 1.0
    * @Date:  2022/6/25 10:12
    * @Parameters: [ids]
    * @Return void
    */
    void batch(Long[] ids);
}
